﻿/*
 * Copyright © 2020, Wuxi Safover Intelligent Technology Co., Ltd. All rights reserved.
 * 
 * 无锡安永智能科技有限公司版权所有，未经许可，不得用于商业用途
 * 
 * Visit: https://www.safover.com/ 
 */

using Safover.LidarCollector.Models;
using Safover.LidarCollector.Config;

namespace Safover.LidarCollector.Core
{
    public abstract class ElectronicCompass : SerialPortDevice
    {
        /// <summary>
        /// 俯仰角
        /// </summary>
        protected float? PitchAngle { get; set; }

        /// <summary>
        /// 方位角
        /// </summary>
        protected float? HeadingAngle { get; set; }

        /// <summary>
        /// 横滚角
        /// </summary>
        protected float? RollAngle { get; set; }

        protected override void ResetSerialPortParameters()
        {
            PortName = RuntimeConfigManager.Instance.ElectronicCompassConfig.PortName;
            BaudRate = RuntimeConfigManager.Instance.ElectronicCompassConfig.BaudRate;
        }

        /// <summary>
        /// 获取俯仰，方位和横滚角
        /// </summary>
        /// <returns></returns>
        public abstract ElectronicCompassAngles? QueryAngles();

    }

    


}
